package com.ponhu.ea2.service.facade;

import com.ponhu.ea2.common.basic.model.PagedResult;
import com.ponhu.ea2.common.basic.model.ResponseBean;
import com.ponhu.ea2.dto.PhMaterialDto;
import com.ponhu.ea2.dto.PhMaterialEditDto;
import com.ponhu.ea2.query.MaterialInfoQuery;
import com.ponhu.ea2.vo.PhAiPictureQueryVo;
import com.ponhu.ea2.vo.PhAiPictureVo;
import com.ponhu.ea2.vo.PhMaterialVo;

import java.util.List;

/**
 * @author luyu
 * @create 2021-10-18 17:47
 */
public interface PhMaterialInfoApiService {

    /**
     * 根据物料编码品牌分类等信息查询物料的集合
     */
    PagedResult<PhMaterialVo> queryPhMaterialInfo(MaterialInfoQuery materialInfoQuery);

    /**
     * 根据物料编码查询物料信息
     *
     * @param materialCode
     * @return
     */
    ResponseBean<PhMaterialVo> getMaterialInfoByCode(String materialCode);

    /**
     * 根据型号id查询物料
     *
     * @param modelId
     * @return
     */
    ResponseBean<PhMaterialVo> getMaterialInfoByModelId(Integer modelId);

    /**
     * 保存物料信息
     *
     * @param phMaterialDto
     * @return
     */
    Boolean savePhMaterial(PhMaterialDto phMaterialDto);

    /**
     * 根据物料id查询物料详情-回显使用
     *
     * @param materialId
     * @return
     */
    ResponseBean<PhMaterialVo> getPhMaterialById(String materialId);

    /**
     * 编辑物料信息
     *
     * @return
     */
    Boolean editPhMaterial(PhMaterialEditDto phMaterialEditDto);

    PhAiPictureVo aiPictureClassify(String imgUrl);

    PhAiPictureQueryVo aiPictureQuery(String itemId, Long materialId, String materialCode);

    List<String> aiPictureClassifyBatchSync(List<String> materialCodeList);

    Boolean aiPictureClassifyBatchAsync(List<String> materialCodeList);
}
